package com.otitan.forest.right.controller;

import com.otitan.forest.right.service.BssForestRightInfoService;
import com.otitan.forest.right.service.SysUserService;
import com.otitan.webapp.framework.basepro.model.DataResult;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.authz.annotation.RequiresRoles;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description: java类作用描述
 * @Author: jiachangsen
 * @CreateDate: 2020/08/28 17:42
 * @UpdateUser: jiachangsen
 * @UpdateDate: 2020/08/28 17:42
 * @UpdateRemark: 修改内容
 * @Version: 1.0
 */
@Slf4j
@Api(tags = "附件上传API", hidden = true)
@RestController
@RequestMapping("/data")
public class DataController {


    @Autowired
    private SysUserService sysUserService;
    @Autowired
    private BssForestRightInfoService bssForestRightInfoService;


    /**
     * 从智慧林业系统查询用户信息 《慎用》
     * @author jiachangsen
     * @param [uuid]
     * @return com.otitan.webapp.framework.basepro.model.DataResult
     * @exception
     * @date 2020/08/21 15:13
     */
    @GetMapping("/syncUser")
    @RequiresRoles(value = {"admin"})
    public DataResult userDataSynchronization(String uuid) {
        return sysUserService.dataSynchronization(uuid);
    }

    /**
     * 从智慧林业系统查询用户信息 《慎用》
     * @author jiachangsen
     * @param [uuid]
     * @return com.otitan.webapp.framework.basepro.model.DataResult
     * @exception
     * @date 2020/08/21 15:13
     */
    @GetMapping("/syncLqData")
    @RequiresRoles(value = {"admin"})
    public DataResult syncLqData(String uuid) {
        return bssForestRightInfoService.syncLqData(uuid);
    }




}
